<style type="text/css">
    .table-madan tr td{background-color: #ffffff;}
    .pihao th{background-color: #ffffff;border-bottom: 2px solid #efefef;}
    .pihao th span{padding: 5px 10px 4px 10px; background-color: #efefef;width: 130px; overflow: visible;font-weight: bold;display:inline-block;font-size: 14px;}
    .product-buy-quantity{*zoom:1;display: list-item;margin-bottom: .0em;text-align: -webkit-match-parent;list-style: none;}
</style>
<div class="change-payment" >
    <div  id="change-payment-tav" style="overflow:auto;height:460px;width:100%;">
     <iframe src="about:blank" name="upload" frameborder="0" class="hide"></iframe>

        <table class="table-madan">
            <tbody>
            <{if $rolls|count gt 0}>
            <{foreach from=$rolls item=item key=key}>
            <input type = "hidden" id = "productId" value = "<{$item[0][0]['productId']}>" name = "productId">
                <tr class="pihao">
                  <th colspan=3>
                    <span><{t}>增票信息<{/t}>：<{$key}></span>
                    </th>
                </tr>
                    <tr>

                            <td>
                                <input type="checkbox" name="memberAddId[]" id="memberAddId[]" value="<{$item['company']}>#-<{$item['company_taxpayer']}>#-<{$item['company_addr']}>#-<{$item['company_mobile']}>#-<{$item['open_bank']}>#-<{$item['bank_account']}>" cnt='<{$it['cntMi']}>'  class="chkRoll" >
                                <label for="chkRoll[<{$it['id']}>]" ><{$item['company']}>#-<{$item['company_taxpayer']}>#-<{$item['company_addr']}>#-<{$item['company_mobile']}>#-<{$item['open_bank']}>#-<{$item['bank_account']}>
                                </label>
                            </td>

                    </tr>

            <{/foreach}>
            <{else}>
                <tr >
                  <th colspan=3>
                    <label><b style='font-size:15px;'><{t}>未发现纳税人登记数据！请重新选择<{/t}></b></label>
                    </th>
                </tr>
            <{/if}>
            </tbody>
        </table>
    </div>
    <table>
        <tfoot>
            <tr>
                <th colspan="2">
                  <button type="submit" class="btn btn-import btn-big "> <li class="form-item form-item-last">
                      <label class="form-label"></label>
                      <span class="form-act">
                        <{button type="submit" class="btn-caution btnSure" label=$___b2c="确定"|t:'b2c' rel="_request"}>
                      </span>
                  </li>
                </button>
                </th>
            </tr>

        </tfoot>
    </table>

</div>

<script>

 var submit = $('change-payment-tav').getElement('button[type=submit]');
  function ajax_callback(type, msg, url) {
      if(type == 'error') {
          submit.removeClass('disabled');
      }
      return top.Message( msg, type, function(){
          if(url) location.href = url;
      });
  }


  $$('.btnSure').addEvent('click',function(e){
        var inputCnt = $$('[name="company_taxpayer"');
        obj = document.getElementsByName("memberAddId[]");
        check_val = [];

        for(k in obj){

            if(obj[k].checked)

                check_val.push(obj[k].value);

        }
        inputCnt.set('value',check_val);

        closeDiv();


    });

</script>